home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 17
/
q17.d81
/
t.catmeister 128
< prev
next >
Wrap
Text File
|
2022-08-28
|
3KB
|
62 lines
Z E R O P A G E : CATMEISTER 128
by Fender Tucker
This doesn't really deserve to be called CATMEISTER because Jeff Jones'
program of the same name for the 64 mode is much more elegant. However,
this little BASIC routine is so handy I wanted to pass it around to any
programmer who plans to submit a program to LOADSTAR 128.
Here's what it does. You have a program that loads and saves files.
In the old days the program would ask for a filename for you to type in.
Well, of course, no one can remember a filename, so modern programs give you
a list of relevant files for you to choose from with a highlight bar.
That's what CATMEISTER 128 does.
IMPORTANT!!! CATMEISTER only works with CONTROL 80, Jon Mattson's superb
BASIC help program from LOADSTAR 128 #10. I plan to use CONTROL 80 in all
of my 80-column programs and in the words of the editor of LOADSTAR 128, you
should, too.
Run this program and all you'll see is a directory scrolling in a
window in the middle of the screen. Press the STOP key to stop the
scrolling. Then move the highlight bar with the CRSR UP/DOWN key. Then
break out of the program with RUN/STOP-RESTORE so you can list the code. As
you can see, it's not a big subroutine.
Lines 2, 5 10 and 11 load and set up CONTROL 80.
The trap in line 600 sends the program to line 604 when you press STOP.
If the directory is not longer than the window, then the user doesn't have
to press STOP. The STOP is only for when the wanted file may scroll out of
the window.
STORE is a CONTROL 80 command that stores the current screen.
The DIRECTORY command may be a selective one. In HOME REFINANCER I
added ,"hr.*" to the command so it would only display files that began with
an "hr." prefix.
The variables in line 604 are important. If you use those variables,
you can change the names of these, but not the values.
The BLOCK command is from CONTROL 80 and it's what does the nifty
highlight bars. I could not live without CONTROL 80.
PEER is a CONTROL 80 command that's the equivalent of BASIC's PEEK
command. This is not easy to do on the 80-column screen without CONTROL 80.
The file you chose will show up as F$ for loading or whatever in line
650. Notice that I have added RUN"HELLO CONNECT" as line 660. That's for
returning to LOADSTAR; it's not part of the subroutine.
That's it. Feel free to renumber and use this routine anytime you are
tempted to ask the user to enter a filename for loading or running. Be sure
your program doesn't use the same variables this routine does.
FT
**** R - Run RETURN - Menu ****